Resonant mass sensors refer to a category of devices in which a structure, typically a cantilever beam at the micro or nano scale, is excited to vibrate at resonance. The structure is coated and functionalized with a sensitive layer that has affinity to a specific vapor/gas, so that upon exposure to the vapor/gas, it can trap some of the vapor/gas on its surface. This leads to an increase of a total mass of the structure, thereby shifting its resonance frequency to a new value. This shift is taken as a measure of the captured mass of that vapor/gas.